home *** CD-ROM | disk | FTP | other *** search
- Note this patch didn't work directly and was installed by hand.
-
- diff -ur old/sudo-1.2/Makefile sudo-1.2/Makefile
- - --- old/sudo-1.2/Makefile Sun Mar 20 20:45:40 1994
- +++ sudo-1.2/Makefile Wed Mar 8 12:43:41 1995
- @@ -88,7 +88,7 @@
- #
-
- # define this for shadow passwords
- - - SHADOW =
- + SHADOW = -DSHADOW_PWD
- CC = gcc
- LEX = flex
- YACC = bison -y
- @@ -108,7 +108,7 @@
- MANSECTION = 8
- MANDIR = /usr/man/man${MANSECTION}
- PROG = sudo.bin
- - - LIBS = -lfl
- + LIBS = -lfl -lshadow
- SUNOS4 = -Bstatic
- LINUX =
-
- diff -ur old/sudo-1.2/check.c sudo-1.2/check.c
- - --- old/sudo-1.2/check.c Sun Dec 5 23:57:31 1993
- +++ sudo-1.2/check.c Wed Mar 8 12:41:46 1995
- @@ -48,6 +48,11 @@
- #include <sys/types.h>
- #endif
-
- +#ifdef SHADOW_PWD
- +#include <shadow.h>
- +#define crypt pw_encrypt
- +#endif
- +
- char *getpass();
-
- static int check_timestamp();
- @@ -79,7 +84,7 @@
- }
- rtn = check_timestamp();
- #ifdef LINUX
- - -if ( setreuid (uid) ) { /* don't want to be root longer than necessary */
- +if ( setreuid (uid, -1) ) { /* don't want to be root longer than necessary */
- #else
- if ( setruid (uid) ) { /* don't want to be root longer than necessary */
- #endif
- @@ -96,7 +101,7 @@
- }
- update_timestamp();
- #ifdef LINUX
- - -if ( setreuid (uid) ) { /* don't want to be root longer than necessary */
- +if ( setreuid (uid, -1) ) { /* don't want to be root longer than necessary */
- #else
- if ( setruid (uid) ) { /* don't want to be root longer than necessary */
- #endif
- @@ -217,14 +222,14 @@
-
- static void check_passwd()
- {
- - -#ifndef SHADOW_PWD
- char *crypt();
- - -#endif
- struct passwd *pw_ent;
- char *encrypted; /* this comes from /etc/passwd */
- char *pass; /* this is what gets entered */
- register int counter=TRIES_FOR_PASSWORD;
- - -
- +#ifdef SHADOW_PWD
- +struct spwd *sp;
- +#endif
-
- if ( (pw_ent = getpwuid( uid )) == NULL ) {
- sprintf ( user, "%u", uid );
- @@ -232,7 +237,11 @@
- inform_user ( GLOBAL_NO_PW_ENT );
- exit (1);
- }
- - -
- +#ifdef SHADOW_PWD
- +sp = getspnam(pw_ent->pw_name);
- +if (sp)
- + pw_ent->pw_passwd = sp->sp_pwdp;
- +#endif
- encrypted = pw_ent -> pw_passwd;
-
- /* you get TRIES_FOR_PASSWORD times to guess your password */
-
- ------------------------------
-